import request from '@/utils/request'
import { host } from "@/api/common";

// 获取用户列表
export function get_user_list(data) {
  return request({
    url: host + '/api/user/user_list',
    method: 'post',
    data
  })
}
// 编辑用户
export function edit_user(data) {
  return request({
    url: host + '/api/user/edit_user',
    method: 'post',
    data
  })
}
// 修改密码
export function edit_password(data) {
  return request({
    url: host + '/api/user/edit_password',
    method: 'post',
    data
  })
}
// 获取用户信息
export function get_user_info(data) {
  return request({
    url: host + '/api/user/get_user_info',
    method: 'post',
    data
  })
}

export function login(data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 获取日志信息
export function get_user_log(data) {
  return request({
    url: host + '/api/user/log',
    method: 'post',
    data
  })
}

// 获取用户选择器列表
export function user_all() {
  return request({
    url: host + '/api/user/user_all',
    method: 'post',
  })
}

// 深蓝小工具执行接口
export function execute_cmd(data) {
  return request({
    url: host + '/api/java/execute_cmd',
    method: 'post',
    data
  })
}
